import { IPSDEDataSetInputDTO } from './ipsdedata-set-input-dto';
import { IPSDEFilterDTO } from './ipsdefilter-dto';
import { IPSDEFilterDTOField } from './ipsdefilter-dtofield';
import { IPSDEMethodDTOField } from '../service/ipsdemethod-dtofield';
import { PSDEMethodDTOImpl } from '../service/psdemethod-dtoimpl';

export class PSDEFilterDTOImpl extends PSDEMethodDTOImpl implements IPSDEFilterDTO, IPSDEDataSetInputDTO {
  protected psdefilterdtofields: IPSDEFilterDTOField[] | null = null;

  getPSDEFilterDTOFields(): IPSDEFilterDTOField[] | null {
    if (this.psdefilterdtofields == null) {
      this.psdefilterdtofields = this.fillChildListModel(this.M.getPSDEFilterDTOFields, 'dataentity.ds.IPSDEFilterDTOField') as IPSDEFilterDTOField[];
    }
    return this.psdefilterdtofields;
  }

  get psDEFilterDTOFields(): IPSDEFilterDTOField[] | null {
    return this.getPSDEFilterDTOFields();
  }

  findPSDEFilterDTOField(objKey: any): IPSDEFilterDTOField | null {
    return this.getPSModel5('dataentity.ds.IPSDEFilterDTOField', this.getPSDEFilterDTOFields(), objKey) as IPSDEFilterDTOField;
  }

  protected psdemethoddtofields: IPSDEMethodDTOField[] | null = null;

  getPSDEMethodDTOFields(): IPSDEMethodDTOField[] | null {
    if (this.psdemethoddtofields == null) {
      this.psdemethoddtofields = this.getPSDEFilterDTOFields() as IPSDEMethodDTOField[];
    }
    return this.psdemethoddtofields;
  }

  get psDEMethodDTOFields(): IPSDEMethodDTOField[] | null {
    return this.getPSDEMethodDTOFields();
  }

  findPSDEMethodDTOField(objKey: any): IPSDEMethodDTOField | null {
    return this.getPSModel5('dataentity.service.IPSDEMethodDTOField', this.getPSDEMethodDTOFields(), objKey) as IPSDEMethodDTOField;
  }

  get cls(): string {
    return 'PSDEFilterDTOImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'dataentity.ds.IPSDEDataSetInputDTO' || cls == 'dataentity.ds.IPSDEFilterDTO') return true;
    return super.instanceof(cls);
  }
}
